package com.chiyi.listener;

import com.chiyi.bean.TOrder;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @date 2021/5/14 20:16
 */
@Service
@Slf4j
@RocketMQMessageListener(consumerGroup = "shop-user-order-topic", topic = "order-topic")
public class OrderTopicListener implements RocketMQListener<TOrder> {
    @Override
    public void onMessage(TOrder o) {
       log.info("监听到一个订单信息：{}" , o);
    }
}
